opam インストール
opamのインストール
code:memo
$ opam init
No configuration file found, using built-in defaults.
Checking for available remotes: rsync and local, git.
- you won't be able to use mercurial repositories unless you install the hg command on your system.
- you won't be able to use darcs repositories unless you install the darcs command on your system.
WARNING Recommended dependencies -- most packages rely on these: - make
- cc
ERROR Missing dependencies -- the following commands are required for opam to operate: - unzip
- bwrap: Sandboxing tool bwrap was not found. You should install 'bubblewrap'. See
code:memo
$ sudo add-apt-repository ppa:avsm/ppa
Description:
Latest stable versions of OCaml and OPAM.
Adding repository.
Press ENTER to continue or Ctrl-c to cancel. Adding deb entry to /etc/apt/sources.list.d/avsm-ubuntu-ppa-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/avsm-ubuntu-ppa-jammy.list
Adding key to /etc/apt/trusted.gpg.d/avsm-ubuntu-ppa.gpg with fingerprint 630F626C9FD811EBC19DF0955B2D0C5561707B09
Reading package lists... Done
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Ubuntu 22.04だとインストールできるものがないとのこと...。
調べたらopamパッケージはあった。
リポジトリを削除
code:memo
$ add-apt-repository --remove ppa:avsm/ppa
Ubuntu 22.04だと↓でよいっぽい
$ apt install opam
code:memo
$ opam init
No configuration file found, using built-in defaults.
Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!
<><> Fetching repository information ><><><><><><><><><><><><><><><><><><><><><>
<><> Required setup - please read <><><><><><><><><><><><><><><><><><><><><><><>
In normal operation, opam only alters files within ~/.opam.
However, to best integrate with your system, some environment variables
should be set. If you allow it to, this initialisation step will update
your bash configuration by adding the following line to ~/.profile:
test -r /home/pogin503/.opam/opam-init/init.sh && . /home/pogin503/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
Otherwise, every time you want to access your opam installation, you will
need to run:
eval $(opam env)
You can always re-run this setup with 'opam init' later.
Do you want opam to modify ~/.profile? N/y/f (default is 'no', use 'f' to choose a different file) y
User configuration:
Updating ~/.profile.
NOTE Make sure that ~/.profile is well sourced in your ~/.bashrc. <><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed ocaml-system.4.13.1
∗ installed ocaml-config.2
∗ installed ocaml.4.13.1
Done.
# Run eval $(opam env --switch=default) to update the current shell environment
現在シェルでopamが使えるようにする。
$ eval $(opam env --switch=default)